package com.mangowang.module.main.adapter;

import android.content.Context;


import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.mangowang.lib.common.help.GlideHelper;
import com.mangowang.lib.common.proto.Mystock;
import com.mangowang.module.main.R;

import java.util.List;

public class MachinesAdapter extends BaseQuickAdapter<Mystock.myMachineGcTypeList.goodsInfo, BaseViewHolder> {

    public MachinesAdapter(Context context, List<Mystock.myMachineGcTypeList.goodsInfo> dataList) {
        super(R.layout.item_marchine, dataList);
    }

    @Override
    protected void convert(BaseViewHolder helper, Mystock.myMachineGcTypeList.goodsInfo item) {
        helper.setText(R.id.tv_ji_ju_name,item.getGoodsSerial())
                .setText(R.id.tv_ji_ju_xin,item.getGoodsName())
                .setText(R.id.tv_un_bine,item.getGoodsUnbindNum())
                .setText(R.id.tv_un_action,item.getGoodsUnactivationNum())
                .setText(R.id.tv_action,item.getGoodsActivationNum());
        GlideHelper.INSTANCE.loadImage(getContext(),helper.getView(R.id.iv_photo), item.getGoodsImage());
    }
}
